package org.example.imageservice.Command;




import org.example.imageservice.service.BgimageService;

import java.io.IOException;
import java.util.List;

public class GetImagesCommand extends Command{
    private final BgimageService bgimageService;
    private final String param1;
    private final String param2;
    private List<String> images;

    public GetImagesCommand(BgimageService bgimageService, String param1, String param2) {
        this.bgimageService = bgimageService;
        this.param1 = param1;
        this.param2 = param2;
    }

    public List<String> getImages() {
        return images;
    }

    public void setImages(List<String> images) {
        this.images = images;
    }

    public void execute() throws IOException {

         images = bgimageService.getImages(param1, param2);

    }
}